package gdonly.top.signin.business;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import gdonly.top.signin.R;

/**
 * Created by zhuzhuxia on 2017/5/14.
 */
public class QueryByStuActivity extends AppCompatActivity {

    private EditText idEdit;
    private Button startBtn;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_querybystu);
        initViews();
    }
    private View.OnClickListener listener = new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            switch(v.getId()){
                case R.id.querybystu_start:
                    Intent intent = new Intent(QueryByStuActivity.this, QueryRecordsActivity.class);
                    intent.putExtra("user_id", idEdit.getText().toString().trim());
                    startActivity(intent);
                    break;
            }
        }
    };

    private void initViews(){
        idEdit = (EditText) findViewById(R.id.user_queryid);
        startBtn = (Button) findViewById(R.id.querybystu_start);
        startBtn.setOnClickListener(listener);
    }


}
